package com.king.pattem.future;

/**
 * @author taomk
 * @version 1.0
 * @since 15-1-30 下午10:08
 */
public class RealData implements Data {

	protected final String result;

	public RealData(String para) {
		// RealData的构造可能很慢，需要用户等待很久，这里使用sleep模拟
		StringBuffer sb = new StringBuffer();
		try {
			for (int i = 0; i < 10; i++) {
				sb.append(para);
				Thread.sleep(100);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		this.result = sb.toString();
	}

	public String getResult() {
		return result;
	}
}
